/*
 * @Author: 脉迈
 * @Date: 2021-10-25 17:37:12
 * @LastEditors: 脉迈
 * @LastEditTime: 2021-10-28 11:21:37
 */
import React from "react";
interface textProps {
  text: string;
  style: any;
  link: string;
}

const BlockButton = (props: textProps) => {
  console.log(props);
  const style = props.style;
  let newStyle: any = {};
  for (const key in style) {
    if (Object.prototype.hasOwnProperty.call(style, key)) {
      newStyle[key] = style[key]["value"];
    }
  }
  return (
    <>
      <a
        href={props.link}
        style={{
          ...newStyle,
          width: "100%",
          height: "100%",
          display: "flex",
          alignItems: "center",
          borderStyle: "solid",
        }}
      >
        {props.text}
      </a>
    </>
  );
};

export default BlockButton;
